package cn.softgame.cms.secure.user.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.softgame.cms.secure.nm.domain.ResDevModel;
import cn.softgame.cms.secure.user.domain.Organization;
import cn.softgame.cms.secure.user.domain.User;
import cn.softgame.cms.secure.user.domain.UserOrgData;
import cn.softgame.cms.secure.user.domain.UserResData;
import cn.softgame.cms.secure.user.persistence.UserMapper;

@Service
public class UserServiceImpl implements UserService {
	
	@Autowired
	private UserMapper mapper;
	
	@Override
	public List<User> queryAllUsers(User user) {
		return mapper.queryAllUsers(user);
	}

	@Override
	public Integer userCount(User user) {
		return mapper.userCount(user);
	}

	@Override
	public void saveUser(User user) {
		mapper.saveUser(user);
	}

	@Override
	public void updateUser(User user) {
		mapper.updateUser(user);
		
	}

	@Override
	public User queryUserByUserId(String userId) {
		// TODO Auto-generated method stub
		return mapper.queryUserByUserId(userId);
	}

	@Override
	public void delUser(String userId) {
		mapper.delUser(userId);
		
	}

	@Override
	public void resetPassword(User user) {
		mapper.resetPassword(user);
		
	}

	@Override
	public void saveUserOrgData(UserOrgData userOrgData) {
		mapper.saveUserOrgData(userOrgData);
		
	}

	@Override
	public void saveUserResData(UserResData userResData) {
		mapper.saveUserResData(userResData);
		
	}

	@Override
	public void updateUserResData(UserResData userResData) {
		mapper.updateUserResData(userResData);
		
	}

	@Override
	public List<UserOrgData> queryUserOrgDataByUserId(String userId) {
		return mapper.queryUserOrgDataByUserId(userId);
	}

	@Override
	public List<UserResData> queryUserResDataByUserId(String userId) {
		return mapper.queryUserResDataByUserId(userId);
	}

	@Override
	public void deleteUserOrgData(String userId) {
		mapper.deleteUserOrgData(userId);
	}

	@Override
	public void deleteUserResData(String userId) {
		mapper.deleteUserResData(userId);
		
	}	
	
	@Override
	public void updatePw(User user) {
		mapper.updatePw(user);
	}	
	
}
